package com.pengpeng.nacos.feign.controller;

import com.pengpeng.nacos.feign.service.IProviderFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 彭鹏
 * @date 2021/10/28.
 */
@RestController
@RequestMapping("/feign")
public class FeignController {

    @Autowired
    private IProviderFeignService providerFeignService;
    @GetMapping("/hello")
    public String hello(String name) {
        String response = providerFeignService.echo(name);
        // 返回结果
        return "feign:"+response;
    }

}
